package com.views;

import java.awt.Color;
import java.awt.Font;

import javax.swing.JButton;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

public class AdminView extends JInternalFrame {

	JLabel lblAdminLabel, lblUserName, lblPassword, lblMessages;

	JLabel lblUserNameError, lblPasswordError;

	JTextField txtUserName;

	JPasswordField txtPassword;

	JButton btnSubmit, btnReset;

	public JLabel getLblUserName() {
		return lblUserName;
	}

	public JLabel getLblPassword() {
		return lblPassword;
	}

	public JTextField getTxtUserName() {
		return txtUserName;
	}

	public JPasswordField getTxtPassword() {
		return txtPassword;
	}

	public JButton getBtnSubmit() {
		return btnSubmit;
	}

	public JButton getBtnReset() {
		return btnReset;
	}

	public JLabel getLblMessages() {
		return lblMessages;
	}

	public JLabel getLblUserNameError() {
		return lblUserNameError;
	}

	public JLabel getLblPasswordError() {
		return lblPasswordError;
	}

	public AdminView() {
		super("Admin Login", true, true, true, true);

		setLayout(null);

		lblAdminLabel = new JLabel("Fill The Admin Details to Login");
		Font adminLabelFont = new Font("Verdana", Font.BOLD, 15);

		lblAdminLabel.setFont(adminLabelFont);
		lblAdminLabel.setForeground(Color.red);

		lblMessages = new JLabel("");
		lblMessages.setFont(adminLabelFont);
		lblMessages.setForeground(Color.red);
		lblMessages.setVisible(false);
		lblUserNameError = new JLabel("*");
		lblUserNameError.setForeground(Color.red);
		lblUserNameError.setFont(adminLabelFont);
		lblUserName = new JLabel("Username");
		lblUserName.setFont(adminLabelFont);
		lblUserName.setForeground(Color.white);
		lblPasswordError = new JLabel("*");
		lblPasswordError.setForeground(Color.red);
		lblPasswordError.setFont(adminLabelFont);
		lblPassword = new JLabel("Password");
		lblPassword.setFont(adminLabelFont);
		lblPassword.setForeground(Color.white);
		txtUserName = new JTextField();
		txtPassword = new JPasswordField();
		btnSubmit = new JButton("Submit");
		btnReset = new JButton("Reset");

		lblAdminLabel.setBounds(100, 30, 300, 50);
		lblMessages.setBounds(100, 270, 350, 50);
		lblUserNameError.setBounds(180, 100, 20, 20);
		lblUserNameError.setVisible(false);
		lblUserName.setBounds(50, 100, 150, 30);
		lblPassword.setBounds(50, 150, 150, 30);
		lblPasswordError.setBounds(180, 150, 20, 20);
		lblPasswordError.setVisible(false);
		txtUserName.setBounds(200, 100, 150, 30);
		txtPassword.setBounds(200, 150, 150, 30);
		btnSubmit.setBounds(200, 200, 80, 40);
		btnReset.setBounds(300, 200, 80, 40);

		add(lblAdminLabel);
		add(lblMessages);
		add(lblUserNameError);
		add(lblPasswordError);
		add(lblUserName);
		add(lblPassword);
		add(txtUserName);
		add(txtPassword);
		add(btnSubmit);
		add(btnReset);

		setBackground(Color.black);
		setVisible(true);
		setSize(450, 450);
		setTitle("Admin Form");

	}
}
